import request from '@/utils/request'

/** 代码信息API开始 */
export function addGenerator(data) {
  return request({
    url: '/api/generator/generator/addGenerator',
    method: 'post',
    needLoading: true,
    data
  })
}

export function queryFieldByGeneratorId(data) {
  return request({
    url: '/api/generator/generator/queryFieldByGeneratorId',
    method: 'get',
    params: data
  })
}

export function updateGenerator(data) {
  return request({
    url: '/api/generator/generator/updateGenerator',
    method: 'put',
    needLoading: true,
    data
  })
}
export function generateResource(data) {
  return request({
    url: '/api/generator/generator/generateResource',
    method: 'post',
    responseType: 'blob',
    data
  })
}
/** 代码信息PI结束 */
